-- GENERATED SPELL FOR [Pit Overlord] --


function spell0_25031(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25031', 667, 1)
end

function spell1_25031(pUnit, Event) --@Cone of Fire,Self--
pUnit:FullCastSpellOnTarget(19630,pUnit)
pUnit:RegisterEvent('Sorts_25031', 602, 1)
end

function spell2_25031(pUnit, Event) --@Death Coil,n/a--
pUnit:FullCastSpellOnTarget(32709,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_25031', 3277, 1)
end

function Sorts_25031(pUnit, Event)
local choix_sorts_25031 = math.random(0, 2)
if choix_sorts_25031 == 0 then
pUnit:RegisterEvent('spell0_25031', 1, 1)
end
if choix_sorts_25031 == 1 then
pUnit:RegisterEvent('spell1_25031', 1, 1)
end
if choix_sorts_25031 == 2 then
pUnit:RegisterEvent('spell2_25031', 1, 1)
end
end

function mob25031_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_25031', math.random(1500, 3000), 1)
end

function mob25031_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25031_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob25031_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(25031, 1, 'mob25031_Action')
RegisterUnitEvent(25031, 2, 'mob25031_Leave')
RegisterUnitEvent(25031, 3, 'mob25031_Kill')
RegisterUnitEvent(25031, 4, 'mob25031_Die')
